<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['middleware'=>['web']],function (){
    Route::any('index','IndexController@index');
    Route::any('addFilm','FilmController@add');
    Route::any('save','FilmController@save');
    Route::any('detail/{id}','FilmController@detail');
    Route::any('update/{id}','FilmController@update');
    Route::any('search','FilmController@search');
    Route::any('rank','FilmController@rank');
    Route::any('offline','FilmController@offline');
    Route::any('del_film','FilmController@delete');
    Route::any('register','UserController@register');
    Route::any('check','UserController@check');
    Route::any('addUser','UserController@add');
    Route::any('login','UserController@login');
    Route::any('verify','UserController@verify');
    Route::any('profile/{name}','UserController@profile');
    Route::any('saveProfile','UserController@profile');
    Route::any('tag','IndexController@tag');
    Route::any('logout','UserController@logout');
    Route::any('send','CommentController@send');
    Route::any('assist','CommentController@assist');
    Route::any('del_comment','CommentController@delete');
    Route::any('test1','UserController@test');
    Route::any('test2','IndexController@test');
});

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {
    //
});

//Route::group(['middleware' => 'web'], function () {
//    Route::auth();
//
//    Route::get('/home', 'HomeController@index');
//});
